Salt : Install
2016/10/08 |
Install Salt which is the Configuration Management System.
It's possible to use Salt on a server with standalone though, but this example shows to configure Server and Client environment.
Administration Server is called Salt Master, Client Server is called Salt Minion. |
|
[1] | Install salt-master on Salt Master Host. |
# install from EPEL
[root@dlp ~]#
[root@dlp ~]# yum --enablerepo=epel -y install salt-master systemctl start salt-master [root@dlp ~]# systemctl enable salt-master
|
[2] | On Salt Master Server, If Firewalld is running, allow related ports. |
[root@dlp ~]# firewall-cmd --add-port={4505/tcp,4506/tcp} --permanent success [root@dlp ~]# firewall-cmd --reload success |
[3] | Install salt-minion on Salt Minion Host. |
# install from EPEL
[root@node01 ~]#
yum --enablerepo=epel -y install salt-minion
[root@node01 ~]#
vi /etc/salt/minion # line 16: uncomment and specify Salt Master Server master: dlp.srv.world
systemctl start salt-minion [root@node01 ~]# systemctl enable salt-minion
|
[4] | When Salt Minion initially starts, he sends public-key for authentication to Salt Master. If Salt Master accepts the key, Salt Master and Salt Minion can connects each other. |
# show the list of keys [root@dlp ~]# salt-key -L Accepted Keys: Denied Keys: Unaccepted Keys: node01.srv.world Rejected Keys: # permit all keys with "A" option [root@dlp ~]# salt-key -A The following keys are going to be accepted: Unaccepted Keys: node01.srv.world Proceed? [n/Y] y
Key for minion node01.srv.world accepted.
[root@dlp ~]#
salt-key -L Accepted Keys: node01.srv.world Denied Keys: Unaccepted Keys: Rejected Keys: # verify working [root@dlp ~]# salt "*" test.ping node01.srv.world: True |